<!DOCTYPE html>
<html lang="zh"
      th:replace="~{layout/index-layout::layout(~{::title}, ~{::link}, ~{::div.content-header}, ~{::section.content}, ~{::script})}"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>管理平台 | 用户管理</title>
    <link rel="stylesheet" th:href="@{/static/plugins/icheck-bootstrap/icheck-bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/static/plugins/ztree_v3/css/zTreeStyle/zTreeStyle.css}">
    <link rel="stylesheet" th:href="@{/static/plugins/select2/dist/css/select2.min.css}">
    <link rel="stylesheet" th:href="@{/static/plugins/select2-theme-bootstrap4/dist/select2-bootstrap.min.css}">
</head>
<body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed">
<div class="wrapper">
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">菜单管理</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item">系统管理</li>
                            <li class="breadcrumb-item active">菜单管理</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content-header -->

        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <!-- Info boxes -->

                <!-- /.row -->

                <!-- Main row -->
                <div class="row">
                    <div class="col">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="card-title"></h5>
                                <div class="card-tools">

                                </div>
                            </div>
                            <div class="card-body">
                                <div class="row">
                                    <div class="col-3 border-right">
                                        <ul id="treeDemo" class="ztree"></ul>
                                    </div>
                                    <div class="col-9">
                                        <form>
                                            <div class="row">
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-2 col-form-label text-right">类型：</label>
                                                        <div class="col-sm-10">
                                                            <input type="text" class="form-control" name="type">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-2 col-form-label text-right">父菜单：</label>
                                                        <div class="col-sm-10">
                                                            <input type="text" class="form-control" name="name">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-2 col-form-label text-right">名称：</label>
                                                        <div class="col-sm-10">
                                                            <input type="text" class="form-control" name="name">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-2 col-form-label text-right">编码：</label>
                                                        <div class="col-sm-10">
                                                            <input type="text" class="form-control" name="code">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-2 col-form-label text-right">图标：</label>
                                                        <div class="col-sm-10">
                                                            <input type="text" class="form-control" name="icon">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col"></div>
                                            </div>
                                            <div class="row">
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-2 col-form-label text-right">排序号：</label>
                                                        <div class="col-sm-10">
                                                            <input type="text" class="form-control" name="sortNo">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-2 col-form-label text-right"></label>
                                                        <div class="col-sm-10 icheck-primary icheck-inline">
                                                            <input type="checkbox" class="form-control" name="isEnabled"
                                                                   id="isEnabled">
                                                            <label for="isEnabled">启用</label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-1 col-form-label text-right">路径：</label>
                                                        <div class="col-sm-11">
                                                            <input type="text" class="form-control" name="url">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-1 col-form-label text-right">简介：</label>
                                                        <div class="col-sm-11">
                                                            <textarea class="form-control" name="intro" rows="5"></textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="row">
                                                <div class="col">
                                                    <div class="form-group row">
                                                        <label class="col-sm-1 col-form-label text-right">备注：</label>
                                                        <div class="col-sm-11">
                                                            <textarea class="form-control" name="memo" rows="5"></textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.row -->
            </div><!--/. container-fluid -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
</div>
<!-- ./wrapper -->
<!-- REQUIRED SCRIPTS -->
<script type="text/javascript" th:src="@{/static/plugins/ztree_v3/js/jquery.ztree.all.min.js}"></script>
<script type="text/javascript" th:src="@{/static/plugins/select2/dist/js/select2.min.js}"></script>
<script>
    var setting = {};

    var zNodes = [
        {
            name: "父节点1 - 展开", open: true,
            children: [
                {
                    name: "父节点11 - 折叠",
                    children: [
                        {name: "叶子节点111"},
                        {name: "叶子节点112"},
                        {name: "叶子节点113"},
                        {name: "叶子节点114"}
                    ]
                },
                {
                    name: "父节点12 - 折叠",
                    children: [
                        {name: "叶子节点121"},
                        {name: "叶子节点122"},
                        {name: "叶子节点123"},
                        {name: "叶子节点124"}
                    ]
                },
                {name: "父节点13 - 没有子节点", isParent: true}
            ]
        },
        {
            name: "父节点2 - 折叠",
            children: [
                {
                    name: "父节点21 - 展开", open: true,
                    children: [
                        {name: "叶子节点211"},
                        {name: "叶子节点212"},
                        {name: "叶子节点213"},
                        {name: "叶子节点214"}
                    ]
                },
                {
                    name: "父节点22 - 折叠",
                    children: [
                        {name: "叶子节点221"},
                        {name: "叶子节点222"},
                        {name: "叶子节点223"},
                        {name: "叶子节点224"}
                    ]
                },
                {
                    name: "父节点23 - 折叠",
                    children: [
                        {name: "叶子节点231"},
                        {name: "叶子节点232"},
                        {name: "叶子节点233"},
                        {name: "叶子节点234"}
                    ]
                }
            ]
        },
        {name: "父节点3 - 没有子节点", isParent: true}

    ];

    $(function () {
        $.fn.zTree.init($("#treeDemo"), setting, zNodes);


    });
</script>
</body>
</html>
